import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';

//第一类item
class BankCardItem extends StatefulWidget {
  String bankname;
  String cardNum;
  BankCardItem({this.bankname,this.cardNum,Key key}) : super(key: key);
  @override
  _BankCardItemState createState() => _BankCardItemState();
}

class _BankCardItemState extends State<BankCardItem> {

  @override
  Widget build(BuildContext context) {
    return Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(4),
          gradient: LinearGradient(
            begin: Alignment.topCenter,
            end: Alignment.bottomCenter,
            colors: [
              Color(0xff50C0EE),
              Color(0xff4665EB),
            ],
          ),
        ),
        width: ScreenUtil.screenWidth,
        height: ScreenUtil().setWidth(69),
        child:Column(
          children: [
            Container(height: ScreenUtil().setWidth(68),
              child:Row(
                children: [
                  SizedBox(width:ScreenUtil().setWidth(14) ,),
                  Container(width: ScreenUtil().setWidth(40),height: ScreenUtil().setWidth(40),),
                  SizedBox(width:ScreenUtil().setWidth(10) ,),
                  Column(
                    children: [
                      SizedBox(
                         height: ScreenUtil().setWidth(14),
                      ),
                      Container(
                        width: ScreenUtil().setWidth(200),
                        child:Text(widget.bankname,style: TextStyle(fontSize: ScreenUtil().setSp(15),color:Colors.white),textAlign: TextAlign.left,),
                      ),
                      Container(
                        width: ScreenUtil().setWidth(200),
                        child:Text(widget.cardNum,style: TextStyle(fontSize: ScreenUtil().setSp(14),color:Colors.white),textAlign: TextAlign.left,),
                      ),
                    ],
                  )

                ],
              ),),
            Container(height: ScreenUtil().setWidth(0.5),width: ScreenUtil.screenWidth,color: Color(0xffD8D8D8),),
          ],
        )
    );
  }
}